<template>
    <div>
        <div class="market_title">托管设置</div>
        <el-form-item label="计划托管" prop="lab_ad_type" :rules="{required: true, message: '请选择', trigger: ['blur', 'change']}">
            <div class="flexbox flexcenter">
                <el-radio-group v-model="createform.lab_ad_type" size="small" @change="managedSet">
                    <el-radio-button label="LAB_AD">开启</el-radio-button>
                    <el-radio-button label="NOT_LAB_AD">关闭</el-radio-button>
                </el-radio-group>
                <span class="user_tips font_12 color_02" v-if="createform.lab_ad_type=='LAB_AD'">Tips：开启计划托管后，已选择的广告组将会失效</span>
            </div> 
        </el-form-item>
    </div>
</template>

<script>
export default {
    props:["createform"],
    name: "",
    data() {
        return {
            
        };
    },
    created() {
        
    },
    methods: {
        // 计划托管
        managedSet() {
            if (this.createform.lab_ad_type == "LAB_AD") {
                this.createform.external_action = 'AD_CONVERT_TYPE_SHOPPING'
                this.createform.delivery.smart_bid_type = 'SMART_BID_CUSTOM'
                this.createform.delivery.cost_control = false
                this.createform.creative_material_mode = 'PROGRAMMATIC_CREATIVE'
                this.createform.delivery.flow_control_mode = 'FLOW_CONTROL_MODE_FAST'
                this.createform.delivery.budget_mode = 'BUDGET_MODE_DAY'
                this.createform.audience.awemeRadio = 1
                this.createform.audience.smart_interest_action = ''
                this.createform.deep_external_action = "";
            }
            this.sessionSave();
        },
        sessionSave(){
            this.$emit("sessionSave")
        }
    },
    components: {},
};
</script>


<style scoped>

</style>

